export const getOffsetTop = function (e) {
  let top = Number(e.offsetTop)
  while (e=e.offsetParent) {
    top += Number(e.offsetTop)
  }
  return top
}
export const getOffsetLeft = function (e) {
  let left = Number(e.offsetLeft)
  while (e=e.offsetParent) {
    left += Number(e.offsetLeft)
  }
  return left
}
export const w_scroll_top=function (scrollT) {
  if(scrollT!==undefined){
    document.documentElement.scrollTop = scrollT
    document.body.scrollTop = scrollT
  }else{
    let scroll_top=0
    scroll_top= document.body.scrollTop||document.documentElement.scrollTop
    return scroll_top
  }
}
